public class DemoFinal {
    public static void main(String[] args) {
        System.out.println(demo01.name);
        String name = "被调用的成员变量";
        int age = 20;
        demo01 demo01 = new demo01();
        demo01.test01();
        System.out.println("---------------");
        demo01 demo02 = new demo01("小一", age);
        demo02.test01();
        System.out.println("---------------");
        demo01 demo03 = new demo01("小一", age,"nan");
        demo03.test01();
        demo01.print();

        new User();
    }
}

class demo01{
    public static String name = "静态成员变量";
    public int age = 22;
    private String gender;


    public demo01(){}

    public demo01(String name,int age){
        this.name = name;
        this.age = age;
    }
    public demo01(String name,int age,String gender){
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    public static void print(){
        name = "静态方法传入的参数";
        System.out.println(name);
    }

    public void test01(){
        System.out.println(age);
        System.out.println(gender);
    }
}
